﻿using System.Collections.Generic;
using System.Windows.Forms;

namespace Ycjw.PipeLine.Scenes.Views
{
    public partial class BubbleDefault : UserControl
    {
        List<Control> m_Controls = new List<Control>();
        public BubbleDefault()
        {
            InitializeComponent();
            this.HorizontalScroll.Visible = false;
        }
        public void Add(string name,string value)
        {
            var bi = new BubbleItem(name, value) { Dock = DockStyle.Top };
            m_Controls.Add(bi);
            uiFlowLayoutPanelContainer.AddControl(bi);
        }

        public void Clear()
        {
            foreach(var c in m_Controls)
            {
                uiFlowLayoutPanelContainer.RemoveControl(c);
                c.Dispose();
            }
            m_Controls.Clear();
        }
    }
}
